/**
 * 
 */
package com.gragra.sequentiaDataGenerator.tests;
import static org.junit.Assert.*;
import java.util.Arrays;
import java.util.Collection;
import org.junit.Test;
import com.gragra.sequentiaDataGenerator.PunctuationSplitOffSegmenter;
/**
 * @author Christoph Teichmann
 * created Mar 27, 2013 3:32:19 PM
 * @version 0.1
 */
public class TestPunctuationSplitOff
{
	/**
	 * Test method for {@link com.gragra.sequentiaDataGenerator.PunctuationSplitOffSegmenter#segment(java.lang.String)}.
	 */
	@Test
	public final void testSegment()
	{
		PunctuationSplitOffSegmenter pss = new PunctuationSplitOffSegmenter("NONE");
		Collection<String[]> s = pss.segment("-..,.Hans.,,,|Noun|CaseLevel|UpperCase");
		int i = 0;
		for(String[] stra : s)
		{
			switch (i++)
			{
			case 0:
				assertEquals("[-, NONE]",Arrays.toString(stra));
				break;
			case 2:
				assertEquals("[., NONE]",Arrays.toString(stra));
				break;
			case 5:
				assertEquals("[Hans, Noun, CaseLevel, UpperCase]",Arrays.toString(stra));
				break;
			case 7:
				assertEquals("[,, NONE]",Arrays.toString(stra));
				break;
			}
		}
		assertEquals(10,s.size());
	}
}
